package com.aiju.cash.core.api;

import com.aiju.app.config.ConfigManager;
import com.zhy.http.okhttp.OkHttpUtils;
import com.zhy.http.okhttp.callback.StringCallback;

import java.io.File;

/**
 * @author: 佐为
 * @date: 2017-06-05 13:34
 * @version: V1.0
 * @Description: 口碑开店文件上传
 */
public class EnterImageApi {

    private String upload = ConfigManager.INIT_SERVER_HOST + "/reputation/upload";

    /**
     * 店铺上传头像
     */
    public void uploadShopImage(String token, File file, StringCallback callback) {
        OkHttpUtils
                .post()
                .url(upload)
                .addFile("uploadFile", "code.jpg", file)
                .addParams("token", token)
                .build()
                .execute(callback);
    }
}
